package com.xbongbong.parent.interfaces;

import com.alibaba.fastjson.JSONObject;
import com.xbongbong.paas.field.FieldAttrEntity;
import com.xbongbong.paas.pojo.dto.FormDataGetDTO;
import com.xbongbong.paas.pojo.vo.FormDataGetVO;
import com.xbongbong.paas.toolbox.exception.XbbException;
import com.xbongbong.paas.toolbox.wrap.UserVO;
import com.xbongbong.pro.formexplain.pojo.vo.HandlerExplainVO;

import java.util.List;

/**
 * 返回tab栏“基本信息”数据
 * @author 吴峰
 * @date 2021/12/22 20:52
 */
public interface BusinessDetailBaseInfoService<T, D> extends ParentBusinessDetailService<T, D> {


    /**
     * 获取 基本详情
     * @param formDataGetDTO
     * @return com.xbongbong.paas.pojo.vo.FormDataGetVO
     * @author 吴峰
     * @date 2022/2/12 14:05
     * @throws XbbException
     */
    FormDataGetVO get(FormDataGetDTO formDataGetDTO) throws XbbException;



    /**
     * 获取表单
     * @param loginUser
     * @param form
     * @param corpid
     * @return
     */
    T getForm(UserVO loginUser, D form, String corpid) throws XbbException;

    /**
     *->com.xbongbong.saas.help.ProDetailHandlerHelp#handleDetailSpecialExplain(com.alibaba.fastjson.JSONObject, java.util.List, java.lang.Integer, java.lang.String, java.lang.String, java.lang.Long)
     * @param formDataEntity
     * @param explainList
     * @throws XbbException
     */
    void handleDetailSpecialExplain(D formDataEntity, List<FieldAttrEntity> explainList) throws XbbException;

    /**
     * 封装VO
     * @param formData
     * @param handlerExplainVO
     * @param data
     * @param form
     * @return com.xbongbong.paas.pojo.vo.FormDataGetVO
     * @author 吴峰
     * @date 2022/2/15 10:57
     * @throws XbbException
     */
    FormDataGetVO returnVo(D formData, HandlerExplainVO handlerExplainVO, JSONObject data, T form, String userId, String corpid) throws XbbException;
}
